<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
<jsp:include page="/WEB-INF/jsp_lib/validate.jsp" />
<jsp:include page="/WEB-INF/jsp_lib/layer.jsp" />
<jsp:include page="/WEB-INF/jsp_lib/finger.jsp" />
<script type="text/javascript"
	src="${path}/style_lib/upload/swfupload/swfupload.js"></script>
<script type="text/javascript"
	src="${path}/style_lib/upload/swfupload/fileprogress.js"></script>
<script type="text/javascript"
	src="${path}/style_lib/upload/swfupload/handlers.js"></script>
<script type="text/javascript">
	var click_id;
	$(function() {
		$("select[name='mac_id']").val("${apply.mac_id}");
		$("select[name='seal_id']").val("${apply.seal_id}");
		$("select[name='is_out']").val("${apply.is_out}");
		$("select[name='use_type']").val("${apply.use_type}");
		$("#form1").validate({
			ignore : [],
			rules : {
				'wkflow_id' : {
					required : true
				},
				'office_opinion' : {
					required : true
				}
			}
		});
	});
	//下拉 印章类型,弹出印章种类
	function mysubmit() {
		if($("#form1").valid()){
			if(confirm("确认发送，进入审批流程吗？")){
				if($("input[name=isFinger]").attr("checked")!="checked"){
					$("#form1").submit();
					return;
				}
				
				DoTesoCmd(1,"fingerNote","password");
				var end = DoTesoCmd(2,"fingerNote","password");
				if(end==0){
					$("#form1").submit();
				}else{
					ohSnap("指纹有误！","error");
				}
			}
		}
	}
</script>
</head>
<body>
	<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<jsp:include page="/WEB-INF/jsp/common/select_user.jsp" />
	<jsp:include page="/WEB-INF/jsp/common/select_type.jsp" />
	<jsp:include page="/WEB-INF/jsp/common/select_word.jsp" />
	<!-- 内容 -->
	<div>
		
	<span style="display: none;">
		<OBJECT CLASSID="CLSID:94793CD3-C768-449B-BE87-40147B56032D" codebase="${path}/style_lib/finger/libFPDev_TESO.ocx" id="ObjFinger" width=152 height=200 border=1>
		</OBJECT>
	</span>
	<input type="hidden" id="fingerNote" value="${LOGIN_USER.note}" />
	<input type="hidden" id="password" value="" />
		
		<form method="post" action="${path}/ix/useapply/apply/send/send.htm"
			id="form1">
			<input name='apply_id' type="hidden" value="${apply._id }" />
			<h2>
				<div>印章使用申请</div>

			</h2>
			<table width="100%" class="lindex">
				<tr>
					<th align="right" style="min-width: 100px;">用印事由</th>
					<td align="left">${apply.reason }</td>
					<th align="right">主送单位</th>
					<td align="left">${apply.company }</td>
				</tr>

				<tr>
					<th align="right">印章仪名称</th>
					<td align="left"><select name="mac_id" disabled="disabled">
							<option value="">--请选择--</option>
							<c:forEach items="${macList}" var="v">
								<option value="${v._id}">${v.code}</option>
							</c:forEach>
					</select></td>

					<th align="right">印章名称</th>
					<td align="left"><select name="seal_id" disabled="disabled">
							<option value="">--请选择--</option>
							<c:forEach items="${sealList}" var="v">
								<option value="${v._id}">${v.name}(${v.true_code})</option>
							</c:forEach>
					</select></td>
				</tr>
				<tr>
					<th align="right">对外用印</th>
					<td align="left"><select name="is_out" disabled="disabled">
							<option value="否">否</option>
							<option value="是">是</option>
					</select></td>
					<th align="right">用印方式</th>
					<td align="left"><select name="use_type" disabled="disabled">
							<option value="柜员自主用印">柜员自主用印</option>
							<option value="本地验密用印">本地验密用印</option>
							<option value="远程验密用印">远程验密用印</option>
					</select></td>
				</tr>
				<tr>
					<th align="right">用印份数</th>
					<td align="left">${apply.copes }</td>
					<th align="right">盖章数/份</th>
					<td align="left">${apply.num }</td>
				</tr>
				<tr>
					<th align="right">申请人</th>
					<td align="left">${user.uname }</td>
					<th align="right">发起人</th>
					<td align="left">${apply.promoter }</td>
				</tr>
				<tr>
					<th align="right">申请部门</th>
					<td align="left">${apply.apply_department }</td>
					<th align="right">申请时间</th>
					<td align="left">${apply.apply_time }</td>
				</tr>
				<tr>
					<th align="right">申请事由<br />具体描述
					</th>
					<td align="left" colspan="3">${apply.note }</td>
				</tr>
				<tr>
					<th align="right">办公室意见</th>
					<td align="left">
						<textarea name="office_opinion" rows="5" cols="30">${apply.office_opinion}</textarea>
					</td>
					<th align="right">行长意见</th>
					<td align="left"></td>
				</tr>
				<tr>
					<th align="right">主题词</th>
					<td align="left" colspan="3">类别词： ${apply.type_name } 文种词：
						${apply.word_name }</td>
				</tr>
				<tr>
					<th align="right">注解</th>
					<td align="left" colspan="3">${apply.other_note }</td>
				</tr>
				<tr>
					<th align="right">用印申请附件</th>
					<td align="left" colspan="3"><span id="apply_file_ids">
							<c:forEach items="${files.apply_files}" var="m">
								<span id='${m._id}'> <a
									href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
								</span>
							</c:forEach>
					</span> <input type="hidden" name="apply_file_ids"
						value="${apply.apply_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">部门审查附件</th>
					<td align="left" colspan="3"><span id="check_file_ids">
							<c:forEach items="${files.check_files}" var="m">
								<a href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
							</c:forEach>
					</span> <input type="hidden" name="check_file_ids"
						value="${apply.check_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">法律审查附件</th>
					<td align="left" colspan="3"><span id="law_file_ids"> <c:forEach
								items="${files.law_files}" var="m">
								<a href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
							</c:forEach>
					</span> <input type="hidden" name="law_file_ids"
						value="${apply.law_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">自定义附件</th>
					<td align="left" colspan="3"><span id="self_file_ids">
							<c:forEach items="${files.self_files}" var="m">
								<a href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
							</c:forEach>
					</span> <input type="hidden" name="self_file_ids"
						value="${apply.self_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">自定义附件</th>
					<td align="left" colspan="3"><span id="other_file_ids">
							<c:forEach items="${files.other_files}" var="m">
								<a href="${path }/download/${m._id}.htm"
									style="margin-right: 10px;">${m.file_name} </a>
							</c:forEach>
					</span> <input type="hidden" name="other_file_ids"
						value="${apply.other_file_ids }" /></td>
				</tr>
				<tr>
					<th align="right">选择审批流程</th>
					<td align="left" colspan="3"><select name="wkflow_id">
							<option value="">--请选择--</option>
							<c:forEach items="${wkflowList}" var="wk">
								<option value="${wk._id}">${wk.name}</option>
							</c:forEach>
					</select></td>
				</tr>
			</table>
			<div class="options">
				<input name="isFinger" type="checkbox" checked="checked"/>是否指纹验证
				<a href="javascript:mysubmit();" class="asave">【保存并发送】</a> 
				<a href="javascript:goBack();" class="asave">【返回】</a>
			</div>
		</form>

	</div>
</body>
</html>